package icegps.com.pingdj.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import icegps.com.pingdj.bean.DeviceStatus;
import icegps.com.pingdj.bean.WorkBean;
import icegps.com.pingdj.map.bean.MapMeasureInfo;

import icegps.com.pingdj.gen.DeviceStatusDao;
import icegps.com.pingdj.gen.WorkBeanDao;
import icegps.com.pingdj.gen.MapMeasureInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig deviceStatusDaoConfig;
    private final DaoConfig workBeanDaoConfig;
    private final DaoConfig mapMeasureInfoDaoConfig;

    private final DeviceStatusDao deviceStatusDao;
    private final WorkBeanDao workBeanDao;
    private final MapMeasureInfoDao mapMeasureInfoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        deviceStatusDaoConfig = daoConfigMap.get(DeviceStatusDao.class).clone();
        deviceStatusDaoConfig.initIdentityScope(type);

        workBeanDaoConfig = daoConfigMap.get(WorkBeanDao.class).clone();
        workBeanDaoConfig.initIdentityScope(type);

        mapMeasureInfoDaoConfig = daoConfigMap.get(MapMeasureInfoDao.class).clone();
        mapMeasureInfoDaoConfig.initIdentityScope(type);

        deviceStatusDao = new DeviceStatusDao(deviceStatusDaoConfig, this);
        workBeanDao = new WorkBeanDao(workBeanDaoConfig, this);
        mapMeasureInfoDao = new MapMeasureInfoDao(mapMeasureInfoDaoConfig, this);

        registerDao(DeviceStatus.class, deviceStatusDao);
        registerDao(WorkBean.class, workBeanDao);
        registerDao(MapMeasureInfo.class, mapMeasureInfoDao);
    }
    
    public void clear() {
        deviceStatusDaoConfig.clearIdentityScope();
        workBeanDaoConfig.clearIdentityScope();
        mapMeasureInfoDaoConfig.clearIdentityScope();
    }

    public DeviceStatusDao getDeviceStatusDao() {
        return deviceStatusDao;
    }

    public WorkBeanDao getWorkBeanDao() {
        return workBeanDao;
    }

    public MapMeasureInfoDao getMapMeasureInfoDao() {
        return mapMeasureInfoDao;
    }

}
